#!/usr/bin/env bash

set -euo pipefail

# This file is sourced by collect.sh and ci-collect.sh

# shellcheck disable=SC2034
readonly INSTRUMENTATIONS=(
  # <module path (colon-separated)> : <javaagent|library> : [ gradle-task-suffix ]
  "activej-http-6.0:javaagent:test"
  "akka:akka-http-10.0:javaagent:test"
  "armeria:armeria-grpc-1.14:javaagent:test"
  "apache-httpasyncclient-4.1:javaagent:test"
  "alibaba-druid-1.0:javaagent:test"
  "alibaba-druid-1.0:javaagent:testStableSemconv"
  "apache-dbcp-2.0:javaagent:test"
  "apache-dbcp-2.0:javaagent:testStableSemconv"
  "apache-httpclient:apache-httpclient-2.0:javaagent:test"
  "apache-httpclient:apache-httpclient-4.0:javaagent:test"
  "apache-httpclient:apache-httpclient-4.3:library:test"
  "apache-httpclient:apache-httpclient-5.0:javaagent:test"
  "apache-dubbo-2.7:javaagent:testDubbo"
  "c3p0-0.9:javaagent:test"
  "c3p0-0.9:javaagent:testStableSemconv"
  "clickhouse-client-0.5:javaagent:test"
  "clickhouse-client-0.5:javaagent:testStableSemconv"
  "aws-sdk:aws-sdk-1.11:javaagent:test"
  "google-http-client-1.19:javaagent:test"
  "http-url-connection:javaagent:test"
  "java-http-client:javaagent:test"
  "jetty-httpclient:jetty-httpclient-9.2:javaagent:test"
  "jetty-httpclient:jetty-httpclient-12.0:javaagent:test"
  "jodd-http-4.2:javaagent:test"
  "netty:netty-3.8:javaagent:test"
  "netty:netty-4.0:javaagent:test"
  "netty:netty-4.1:javaagent:test"
  "okhttp:okhttp-2.2:javaagent:test"
  "okhttp:okhttp-3.0:javaagent:test"
  "pekko:pekko-http-1.0:javaagent:test"
  "play:play-ws:play-ws-1.0:javaagent:test"
  "play:play-ws:play-ws-2.0:javaagent:test"
  "play:play-ws:play-ws-2.1:javaagent:test"
  "reactor:reactor-netty:reactor-netty-0.9:javaagent:test"
  "reactor:reactor-netty:reactor-netty-1.0:javaagent:test"
  "spring:spring-webflux:spring-webflux-5.0:javaagent:test"
  "vertx:vertx-http-client:vertx-http-client-3.0:javaagent:test"
  "vertx:vertx-http-client:vertx-http-client-4.0:javaagent:test"
  "vertx:vertx-http-client:vertx-http-client-5.0:javaagent:test"
  "vertx:vertx-redis-client-4.0:javaagent:test"
  "vertx:vertx-redis-client-4.0:javaagent:testStableSemconv"
  "vertx:vertx-sql-client:vertx-sql-client-4.0:javaagent:test"
  "vertx:vertx-sql-client:vertx-sql-client-4.0:javaagent:testStableSemconv"
  "vertx:vertx-sql-client:vertx-sql-client-5.0:javaagent:test"
  "vertx:vertx-sql-client:vertx-sql-client-5.0:javaagent:testStableSemconv"
  "aws-sdk:aws-sdk-1.11:javaagent:testStableSemconv"
  "aws-sdk:aws-sdk-2.2:javaagent:test"
  "aws-sdk:aws-sdk-2.2:javaagent:testStableSemconv"
  "aws-sdk:aws-sdk-2.2:javaagent:testBedrockRuntime"
  "hikaricp-3.0:javaagent:test"
  "hikaricp-3.0:javaagent:testStableSemconv"
  "tomcat:tomcat-jdbc:javaagent:test"
  "tomcat:tomcat-jdbc:javaagent:testStableSemconv"
  "oshi:javaagent:test"
  "oshi:javaagent:testExperimental"
  "vibur-dbcp-11.0:javaagent:test"
  "vibur-dbcp-11.0:javaagent:testStableSemconv"
  "elasticsearch:elasticsearch-api-client-7.16:javaagent:test"
  "elasticsearch:elasticsearch-api-client-7.16:javaagent:testStableSemconv"
  "elasticsearch:elasticsearch-rest-7.0:javaagent:test"
  "elasticsearch:elasticsearch-rest-7.0:javaagent:testStableSemconv"
  "elasticsearch:elasticsearch-transport-5.0:javaagent:test"
  "elasticsearch:elasticsearch-transport-5.0:javaagent:testStableSemconv"
  "elasticsearch:elasticsearch-transport-5.0:javaagent:testExperimental"
  "elasticsearch:elasticsearch-transport-5.3:javaagent:test"
  "elasticsearch:elasticsearch-transport-5.3:javaagent:testStableSemconv"
  "elasticsearch:elasticsearch-transport-5.3:javaagent:testExperimental"
  "elasticsearch:elasticsearch-transport-6.0:javaagent:elasticsearch6Test"
  "elasticsearch:elasticsearch-transport-6.0:javaagent:elasticsearch6TestStableSemconv"
  "elasticsearch:elasticsearch-transport-6.0:javaagent:elasticsearch6TestExperimental"
  "elasticsearch:elasticsearch-transport-6.0:javaagent:elasticsearch65Test"
  "elasticsearch:elasticsearch-transport-6.0:javaagent:elasticsearch65TestStableSemconv"
  "elasticsearch:elasticsearch-transport-6.0:javaagent:elasticsearch65TestExperimental"
  "elasticsearch:elasticsearch-transport-6.0:javaagent:elasticsearch7Test"
  "elasticsearch:elasticsearch-transport-6.0:javaagent:elasticsearch7TestStableSemconv"
  "elasticsearch:elasticsearch-transport-6.0:javaagent:elasticsearch7TestExperimental"
  "apache-httpclient:apache-httpclient-5.2:library:test"
  "armeria:armeria-1.3:javaagent:test"
  "async-http-client:async-http-client-1.9:javaagent:test"
  "async-http-client:async-http-client-2.0:javaagent:test"
  "apache-dubbo-2.7:javaagent:testDubbo"
  "finagle-http-23.11:javaagent:test"
  "finatra-2.9:javaagent:test"
  "spring:spring-batch-3.0:javaagent:test"
  "spring:spring-data:spring-data-1.8:javaagent:test"
  "spring:spring-integration-4.1:javaagent:test"
  "spring:spring-integration-4.1:javaagent:testWithRabbitInstrumentation"
  "spring:spring-integration-4.1:javaagent:testWithProducerInstrumentation"
  "spring:spring-jms:spring-jms-2.0:javaagent:test"
  "spring:spring-kafka-2.7:javaagent:test"
  "spring:spring-kafka-2.7:javaagent:testNoReceiveTelemetry"
  "spring:spring-pulsar-1.0:javaagent:test"
  "spring:spring-rabbit-1.0:javaagent:test"
  "spring:spring-rmi-4.0:javaagent:test"
  "spring:spring-scheduling-3.1:javaagent:test"
  "spring:spring-scheduling-3.1:javaagent:testExperimental"
  "spring:spring-web:spring-web-3.1:library:test"
  "spring:spring-web:spring-web-6.0:javaagent:test"
  "spring:spring-webflux:spring-webflux-5.0:javaagent:test"
  "spring:spring-webflux:spring-webflux-5.3:library:test"
  "spring:spring-webmvc:spring-webmvc-3.1:javaagent:test"
  "spring:spring-webmvc:spring-webmvc-3.1:javaagent:testExperimental"
  "spring:spring-webmvc:spring-webmvc-5.3:library:test"
  "spring:spring-webmvc:spring-webmvc-6.0:javaagent:test"
  "spring:spring-webmvc:spring-webmvc-3.1:javaagent:testExperimental"
  "spring:spring-webmvc:spring-webmvc-6.0:javaagent:test"
  "spring:spring-webmvc:spring-webmvc-6.0:javaagent:testExperimental"
  "openai:openai-java-1.1:javaagent:test"
  "aws-lambda:aws-lambda-core-1.0:javaagent:test"
  "aws-lambda:aws-lambda-events-2.2:javaagent:test"
  "aws-lambda:aws-lambda-events-3.11:library:test"
  "cassandra:cassandra-3.0:javaagent:test"
  "cassandra:cassandra-3.0:javaagent:testStableSemconv"
  "cassandra:cassandra-4.0:javaagent:test"
  "cassandra:cassandra-4.0:javaagent:testStableSemconv"
  "cassandra:cassandra-4.4:javaagent:test"
  "cassandra:cassandra-4.4:javaagent:testStableSemconv"
  "camel-2.20:javaagent:test"
  "camel-2.20:javaagent:testStableSemconv"
  "camel-2.20:javaagent:testExperimental"
  "couchbase:couchbase-2.0:javaagent:test"
  "couchbase:couchbase-2.0:javaagent:testStableSemconv"
  "couchbase:couchbase-2.6:javaagent:test"
  "couchbase:couchbase-2.6:javaagent:testStableSemconv"
  "couchbase:couchbase-2.6:javaagent:testExperimental"
  "dropwizard:dropwizard-views-0.7:javaagent:test"
  "geode-1.4:javaagent:test"
  "geode-1.4:javaagent:testStableSemconv"
  "grails-3.0:javaagent:test"
  "grizzly-2.3:javaagent:test"
  "gwt-2.0:javaagent:test"
  "graphql-java:graphql-java-12.0:javaagent:test"
  "graphql-java:graphql-java-20.0:javaagent:test"
  "graphql-java:graphql-java-20.0:javaagent:testDataFetcher"
)

#  Some instrumentation test suites don't run ARM, so we use colima to run them in an x86_64
#  container.
# shellcheck disable=SC2034
readonly COLIMA_INSTRUMENTATIONS=(
  "spring:spring-jms:spring-jms-6.0:javaagent:test"
  "elasticsearch:elasticsearch-rest-6.4:javaagent:test"
  "elasticsearch:elasticsearch-rest-6.4:javaagent:testStableSemconv"
  "elasticsearch:elasticsearch-rest-5.0:javaagent:test"
  "elasticsearch:elasticsearch-rest-5.0:javaagent:testStableSemconv"
  "oracle-ucp-11.2:javaagent:test"
  "oracle-ucp-11.2:javaagent:testStableSemconv"
)
